package com.bl.student.dao.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by yujingyi on 2018/3/17.
 */
@Entity
@Data
@Table(name = "apply")
@ApiModel(value = "申请", description = "申请记录表")
@DynamicInsert
@DynamicUpdate

public class ApplyEntity {

    @Id
    @ApiModelProperty(value = "id")
    @Column(name = "apply_id")
    private String applyId;

    @ApiModelProperty(value = "甲方id")
    @Column(name = "partya_id")
    private String partyaId;

    @ApiModelProperty(value = "乙方id")
    @Column(name = "partyb_id")
    private String partybId;

    @ApiModelProperty(value = "任务id")
    @Column(name = "task_id")
    private String taskId;

    @ApiModelProperty(value = "费用")
    private BigDecimal money;

    @ApiModelProperty(value = "状态 状态：0-已申请，1-已接受 2- 已拒绝")
    private int status;

    @ApiModelProperty(value = "用户作品url")
    private String url;

    @ApiModelProperty(value = "用户自我评价comment")
    private String comment;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "开始时间")
    @Column(name = "start_time")
    private Date startTime;

    private int refund;

    @ApiModelProperty(value = "甲方开始未完成 0 不可 1 可")
    @Column(name = "start_refund")
    private int startRefund;
}
